package day03;

public class OperDemo1 {
    public static void main(String[] args) {
        //算术运算符:+,-,*,/,%,++,--
        /*
        System.out.println(5%2);//1,商2余1
        System.out.println(2%5);//2,商0余2
        System.out.println(8%2);//0,商4余0 整除
        System.out.println(0%5);//0,商0余0 整除
         */

        /*
        //++单独使用
        int a = 5;
        int b = 5;
        a++;
        ++b;
        System.out.println(a);//6
        System.out.println(b);//6
         //++被使用
        int c = 5, d = 5;
        int e = c++;
        int f = ++d;
        System.out.println(c);//6
        System.out.println(d);//6
        System.out.println(e);//5
        System.out.println(f);//6
         */

        /*
        //--单独使用
        int a = 5;
        int b = 5;
        a--;
        --b;
        System.out.println(a);//4
        System.out.println(b);//4
        //--被使用
        int c = 5, d = 5;
        int e = c--;
        int f = --d;
        System.out.println(c);//4
        System.out.println(d);//4
        System.out.println(e);//5
        System.out.println(f);//4
         */





    }
}
